<script setup lang="ts">
import { useRoute, useRouter } from 'vue-router';

const route = useRoute();
const router = useRouter();

</script>


<template>
  <div class="detail">
    <p>文章详情的id: {{ $route.params.id }}</p>
    <button @click="router.back()">返回</button>
  </div>
</template>

<style>
.detail {
  position: absolute;
  padding: 10px;
  background-color: #fff;
  margin-top: 10px;
  width: 100%;
  height: 100%;
}
button {
  margin-top: 10px;
  padding: 10px;
  background-color:aquamarine;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
</style>